Optimal. Leaf size=66 \[ \frac{\sqrt{b} \tanh ^{-1}\left (\frac{\sqrt{b} \sec (e+f x)}{\sqrt{a+b \sec ^2(e+f x)}}\right )}{f}-\frac{\cos (e+f x) \sqrt{a+b \sec ^2(e+f x)}}{f} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0533864, antiderivative size = 66, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 4, integrand size = 23, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.174, Rules used = {4134, 277, 217, 206} \[ \frac{\sqrt{b} \tanh ^{-1}\left (\frac{\sqrt{b} \sec (e+f x)}{\sqrt{a+b \sec ^2(e+f x)}}\right )}{f}-\frac{\cos (e+f x) \sqrt{a+b \sec ^2(e+f x)}}{f} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 4134
Rule 277
Rule 217
Rule 206
Rubi steps
\begin{align*} \int \sqrt{a+b \sec ^2(e+f x)} \sin (e+f x) \, dx &=\frac{\operatorname{Subst}\left (\int \frac{\sqrt{a+b x^2}}{x^2} \, dx,x,\sec (e+f x)\right )}{f}\\ &=-\frac{\cos (e+f x) \sqrt{a+b \sec ^2(e+f x)}}{f}+\frac{b \operatorname{Subst}\left (\int \frac{1}{\sqrt{a+b x^2}} \, dx,x,\sec (e+f x)\right )}{f}\\ &=-\frac{\cos (e+f x) \sqrt{a+b \sec ^2(e+f x)}}{f}+\frac{b \operatorname{Subst}\left (\int \frac{1}{1-b x^2} \, dx,x,\frac{\sec (e+f x)}{\sqrt{a+b \sec ^2(e+f x)}}\right )}{f}\\ &=\frac{\sqrt{b} \tanh ^{-1}\left (\frac{\sqrt{b} \sec (e+f x)}{\sqrt{a+b \sec ^2(e+f x)}}\right )}{f}-\frac{\cos (e+f x) \sqrt{a+b \sec ^2(e+f x)}}{f}\\ \end{align*}
Mathematica [A] time = 0.150015, size = 98, normalized size = 1.48 \[ \frac{\sqrt{2} \cos (e+f x) \sqrt{a+b \sec ^2(e+f x)} \left (\sqrt{b} \tanh ^{-1}\left (\frac{\sqrt{a \cos ^2(e+f x)+b}}{\sqrt{b}}\right )-\sqrt{a \cos ^2(e+f x)+b}\right )}{f \sqrt{a \cos (2 (e+f x))+a+2 b}} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.077, size = 93, normalized size = 1.4 \begin{align*} -{\frac{1}{fa\sec \left ( fx+e \right ) } \left ( a+b \left ( \sec \left ( fx+e \right ) \right ) ^{2} \right ) ^{{\frac{3}{2}}}}+{\frac{b\sec \left ( fx+e \right ) }{fa}\sqrt{a+b \left ( \sec \left ( fx+e \right ) \right ) ^{2}}}+{\frac{1}{f}\sqrt{b}\ln \left ( \sec \left ( fx+e \right ) \sqrt{b}+\sqrt{a+b \left ( \sec \left ( fx+e \right ) \right ) ^{2}} \right ) } \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.07868, size = 468, normalized size = 7.09 \begin{align*} \left [-\frac{2 \, \sqrt{\frac{a \cos \left (f x + e\right )^{2} + b}{\cos \left (f x + e\right )^{2}}} \cos \left (f x + e\right ) - \sqrt{b} \log \left (\frac{a \cos \left (f x + e\right )^{2} + 2 \, \sqrt{b} \sqrt{\frac{a \cos \left (f x + e\right )^{2} + b}{\cos \left (f x + e\right )^{2}}} \cos \left (f x + e\right ) + 2 \, b}{\cos \left (f x + e\right )^{2}}\right )}{2 \, f}, -\frac{\sqrt{-b} \arctan \left (\frac{\sqrt{-b} \sqrt{\frac{a \cos \left (f x + e\right )^{2} + b}{\cos \left (f x + e\right )^{2}}} \cos \left (f x + e\right )}{b}\right ) + \sqrt{\frac{a \cos \left (f x + e\right )^{2} + b}{\cos \left (f x + e\right )^{2}}} \cos \left (f x + e\right )}{f}\right ] \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \sqrt{a + b \sec ^{2}{\left (e + f x \right )}} \sin{\left (e + f x \right )}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.25855, size = 78, normalized size = 1.18 \begin{align*} -\frac{{\left (\frac{b \arctan \left (\frac{\sqrt{a \cos \left (f x + e\right )^{2} + b}}{\sqrt{-b}}\right )}{\sqrt{-b}} + \sqrt{a \cos \left (f x + e\right )^{2} + b}\right )} \mathrm{sgn}\left (\cos \left (f x + e\right )\right )}{f} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]